package com.sjjy.ta.impl;

import com.sjjy.dao.model.OperationLog;
import com.sjjy.ta.iface.OperationLogService;
import com.sys.plat.bean.PageBean;
import com.sys.plat.service.base.BaseServiceImpl;

import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: mabo
 * Date: 11-3-14
 * Time: 下午8:02
 * To change this template use File | Settings | File Templates.
 */
public class OperationLogImpl extends BaseServiceImpl implements OperationLogService{
    public void list(PageBean pageBean) {
        pageBean.setHql("FROM OperationLog  _t");
        this.page(pageBean);
    }

    public void save(OperationLog ol) {
        if (ol.getId() == null || ol.getId().equals("")) {
            ol.setId(null);
            ol.setCreateDate(new Date());
            this.dao.saveObject(ol);
        }else {
            this.dao.updateObject(ol);
        }
    }
}

